package com.ubadong.studentmng.service.impl;

import java.util.List;

import com.ubadong.studentmng.dao.StudentDAO;
import com.ubadong.studentmng.dao.impl.StudentDAOImpl;
import com.ubadong.studentmng.service.StudentService;
import com.ubadong.studentmng.vo.Student;

public class StudentServiceImpl implements StudentService{

	StudentDAO studentDAO = new StudentDAOImpl();
	//用于计算总记录数
		public int countAllStudent(Student student){
			
			return studentDAO.countAllStudent(student);
		}
		//查询所用学生
	public List<Student> getAllStudent(Student student) {
		
		return studentDAO.getAllStudent(student);
	}
	//增加学生
	public void addStduent(Student student) {
		
		studentDAO.addStduent(student);
	}

	//查询单个用户
	public Student getStudentById(int id){
		return studentDAO.getStudentById(id);
	}
	//更新学生
	public void updateStduent(Student student) {
		studentDAO.updateStduent(student);
		
	}
	//删除学生
	public void deleteStduent(String ids) {
		studentDAO.deleteStduent(ids);
	}

}
